<?php
/**
 * Created by PhpStorm.
 * User: 王 朋
 * Date: 2018/5/1
 * Time: 10:37
 */
include_once '../../../database/connect.php';

ignore_user_abort(true);
set_time_limit(0);
date_default_timezone_set('PRC');
$run_time = $_GET['runTime'];
$examID = $_GET['examID'];

$now = time();
$loop = $run_time - $now;
sleep($loop);

$sql = 'update cfe_exam set status=2 where exam_id=?';
$stm = $mysql_con->prepare($sql);
$stm->execute(array($examID));


?>